﻿Imports System.Data
Imports System.Data.Odbc
Imports WSEntidades
Public Class MovcotFact
    Public Shared Function Build(ByVal dr As OdbcDataReader) As MovcotBE
        Dim tmpMovcot As MovcotBE = New MovcotBE()
        Try
            With tmpMovcot
                .Cantidad = convertDTFromDb.ConvertDecimal(dr.Item("Cantidad"))
                .ClaMoneda = convertDTFromDb.ConvertString(dr.Item("ClaMoneda"))
                .ClaProducto = convertDTFromDb.ConvertString(dr.Item("ClaProducto"))
                .ClaProvee = convertDTFromDb.ConvertString(dr.Item("ClaProvee"))
                .DescPar = convertDTFromDb.ConvertDecimal(dr.Item("DescPar"))
                .Descripcion = convertDTFromDb.ConvertString(dr.Item("Descripcion"))
                .FecEnt = convertDTFromDb.convertDateTime(dr.Item("FecEnt"))
                .ImpDesc = convertDTFromDb.ConvertDecimal(dr.Item("ImpDesc"))
                .ImpIva = convertDTFromDb.ConvertDecimal(dr.Item("ImpIva"))
                .NumCot = convertDTFromDb.ConvertLong(dr.Item("NumCot"))
                .NumCuenta = convertDTFromDb.ConvertString(dr.Item("NumCuenta"))
                .Partida = convertDTFromDb.convertInt32(dr.Item("Partida"))
                .PorcIva = convertDTFromDb.ConvertDecimal(dr.Item("PorcIva"))
                .PrecioUni = convertDTFromDb.ConvertDecimal(dr.Item("PrecioUni"))
                .StatAut = convertDTFromDb.ConvertString(dr.Item("StatAut"))
                .Status = convertDTFromDb.ConvertString(dr.Item("Status"))
                .UniMed = convertDTFromDb.ConvertString(dr.Item("UniMed"))
            End With
            Return tmpMovcot
        Catch ex As Exception
            Throw
        Finally
            tmpMovcot = Nothing
        End Try
    End Function
End Class
